package com.skynet.springcloud.service;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.skynet.springcloud.entities.Dept;

//@FeignClient(value="MICROSERVICE-PROVIDER")
@FeignClient(value="MICROSERVICE-PROVIDER",fallbackFactory=DCSFallbackFactory.class)
public interface DeptClientService {
    @GetMapping("/dept/list")
    public List<Dept> list();

    @GetMapping("/dept/{id}")
    public Dept get(@PathVariable("id") Long id);

    @PostMapping("/dept/add")
    public boolean add(@RequestBody Dept dept);
	

}
